* sequencer updates / other small fixes
authorMichael Dale <dale@users.mediawiki.org>
Wed, 4 Nov 2009 11:24:48 +0000 (11:24 +0000)
committerMichael Dale <dale@users.mediawiki.org>
Wed, 4 Nov 2009 11:24:48 +0000 (11:24 +0000)
13 files changed:
js2/mwEmbed/example_usage/Player_Themable.html
js2/mwEmbed/libAddMedia/remoteSearchDriver.js
js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js
js2/mwEmbed/libClipEdit/mvClipEdit.js
js2/mwEmbed/libEmbedVideo/embedVideo.js
js2/mwEmbed/libSequencer/mvFirefoggRender.js
js2/mwEmbed/libSequencer/mvPlayList.js
js2/mwEmbed/libSequencer/mvSequencer.js
js2/mwEmbed/mv_embed.js
js2/mwEmbed/skins/ctrlBuilder.js
js2/mwEmbed/skins/kskin/playerSkin.css
js2/mwEmbed/skins/mvpcf/playerSkin.css
js2/mwEmbed/tests/testLang.html

index 223bd3c..b9d14d7 100644 (file)
@@ -7,7 +7,7 @@
 </head>
 <script type="text/javascript">
 </script>
-<body bgcolor="#FFF">
+<body>
 <h3> Sample Themable Player:</h3>
 To play with dynamic Themes install <a href="http://jqueryui.com/themeroller/developertool/">Themeroller</a><p><p>
 
index 2df5490..c060e36 100644 (file)
@@ -1557,7 +1557,7 @@ remoteSearchDriver.prototype = {
                }
        },
        checkForFile:function( fName, callback){
-               js_log("checkForFile::");
+               js_log("checkForFile::" + fName );
                var _this = this;        
                reqObj={
                                'action':'query',
index 00b11b3..9367ce1 100644 (file)
@@ -188,10 +188,9 @@ mediaWikiSearch.prototype = {
                                // or better improve the wiki-text parsing and use above 
                                var desc = rObj.desc.match(/\|\s*description\s*=\s*(([^\n]*\n)*)\|\s*source=/i);
                                if( desc && desc[1] ){                                  
-                                       rObj.desc = $j.trim( desc[1] );
-                                       var cat = wgUserLanguage;
+                                       rObj.desc = $j.trim( desc[1] );                                 
                                        //attempt to get the user language if set: 
-                                       if( wgUserLanguage ){           
+                                       if( typeof wgUserLanguage != 'undefined' && wgUserLanguage ){           
                                                //for some reason the RegExp object is not happy:
                                                var reg = new RegExp( '\{\{\s*' + wgUserLanguage + '([^=]*)=([^\}]*)\}\}', 'gim' );                                             
                                                var langMatch = reg.exec( rObj.desc );
index b08f738..8a08d0c 100644 (file)
@@ -30,7 +30,8 @@ loadGM({
        "mwe-preview_inout" : "Preview in-out points",
        "mwe-edit-tools" : "Edit tools",
        "mwe-inline-description" : "Inline description",
-       "mwe-edit-video-tools" : "Edit video tools:"
+       "mwe-edit-video-tools" : "Edit video tools:",
+       "mwe-duration" : "Duration:"
 });
 
 var default_clipedit_values = {
@@ -102,22 +103,25 @@ mvClipEdit.prototype = {
                'duration':{
                        'media':['image','template'],
                        'doEdit':function( _this, target ){
-                               //(_this is a smilClip instance)
-                               //do clock mouse scroll duration editor
+                               function doUpdateDur( inputElm ){
+                                       js_log("update duration:" + $j( inputElm ).val() );
+                                       //update the parent sequence object:
+                                       _this.rObj.dur = smilParseTime( $j( inputElm ).val() );
+                                       //update the playlist:
+                                       _this.p_seqObj.do_refresh_timeline( true );
+                               }
+                                                       
                                $j(target).html(
-                                               '<label for="ce_dur">Duration: </label>' +
+                                               '<label for="ce_dur">' + gM('mwe-duration') + '</label>' +
                                                '<input name="ce_dur" tabindex="1" maxlength="11" value="'+
                                                        seconds2npt( _this.rObj.getDuration() )+
                                                        '" size="10"/>'+
                                        '</div>'
                                ).children("input[name='ce_dur']").change(function(){
-                                        js_log("update duration:" + $j(this).val() );
-                                        //update the parent sequence object:
-                                        _this.rObj.dur = smilParseTime( $j(this).val() );
-                                        //update the playlist:
-                                        _this.p_seqObj.do_refresh_timeline( true );
+                                        doUpdateDur(this);                                     
                                });
-
+                               //Strange can't chain this binding for some reason...
+                               $j(target).find("input[name='ce_dur']").upDownTimeInputBind( doUpdateDur );
                        }
                },
                'inoutpoints':{
@@ -144,7 +148,7 @@ mvClipEdit.prototype = {
                'fileopts':{
                        'media':['image','video','template'],
                        'doEdit':function(_this, target ){
-                               //if media type is template we have to query to get its URI to get its paramaters
+                               //if media type is template we have to query to get its URI to get its parameters
                                if(_this.media_type == 'template' && !_this.rObj.tVars){
                                        mv_set_loading('#sub_cliplib_ic');
                                        var reqObj ={   'action':'query',
@@ -391,9 +395,11 @@ mvClipEdit.prototype = {
        },
        setInOutBindings:function(){
                var _this = this;
+               //setup a top level shortcut: 
+               var $tp = $j('#'+this.control_ct);
 
-               var start_sec = npt2seconds($j('#'+this.control_ct + ' .startInOut').val() );
-               var end_sec   = npt2seconds($j('#'+this.control_ct + ' .endInOut').val() );
+               var start_sec = npt2seconds( $tp.find('.startInOut').val() );
+               var end_sec   = npt2seconds( $tp.find('.endInOut').val() );
 
                //if we don't have 0 as start then assume we are in a range request and give some buffer area:
                var min_slider =  (start_sec - 60 < 0 ) ? 0 : start_sec - 60;
@@ -403,23 +409,49 @@ mvClipEdit.prototype = {
                        max_slider = end_sec;
                }
 
-               $j('#'+this.control_ct + ' .inOutSlider').slider({
+               $tp.find('.inOutSlider').slider({
                        range: true,
                        min: min_slider,
                        max: max_slider,
+                       animate: true,
                        values: [start_sec, end_sec],
                        slide: function(event, ui) {
                                //js_log(" vals:"+  seconds2npt( ui.values[0] ) + ' : ' + seconds2npt( ui.values[1]) );
-                               $j('#'+_this.control_ct + ' .startInOut').val( seconds2npt( ui.values[0] ) );
-                               $j('#'+_this.control_ct + ' .endInOut').val( seconds2npt( ui.values[1] ) );
+                               $tp.find('.startInOut').val( seconds2npt( ui.values[0] ) );
+                               $tp.find('.endInOut').val( seconds2npt( ui.values[1] ) );
                        },
                        change:function(event, ui){
                                do_video_time_update( seconds2npt( ui.values[0]), seconds2npt( ui.values[1] ) );
                        }
+               });             
+               
+               //bind up and down press when focus on start or end 
+               $tp.find('.startInOut').upDownTimeInputBind( function( inputElm ){              
+                       var s_sec = npt2seconds( $j( inputElm ).val() );
+                       var e_sec = npt2seconds( $tp.find('.endInOut').val() )                                                          
+                       if( s_sec > e_sec )
+                               $j( inputElm ).val( seconds2npt( e_sec - 1 ) );                         
+                       //update the slider: 
+                       var values = $tp.find('.inOutSlider').slider('option', 'values');
+                       js_log('in slider len: ' + $tp.find('.inOutSlider').length);
+                       //set to 5 
+                       $tp.find('.inOutSlider').slider('value', 10 );
+                       debugger;
+                       $tp.find('.inOutSlider').slider('option', 'values', [s_sec, e_sec] );
+                       var values = $tp.find('.inOutSlider').slider('option', 'values');
+                       js_log('values (after update):' + values );
                });
-
+               $tp.find('.endInOut').upDownTimeInputBind( function( inputElm ){                        
+                       var s_sec = npt2seconds( $tp.find('.startInOut').val() );       
+                       var e_sec = npt2seconds( $j( inputElm ).val() );                                        
+                       if( e_sec < s_sec )
+                               $j( inputElm ).val(  seconds2npt( s_sec + 1 ) );                                                
+                       //update the slider: 
+                       $tp.find('.inOutSlider').slider('option', 'values', [ s_sec, e_sec ]);
+               });
+               
                //preview button:
-               $j('#'+this.control_ct + ' .inOutPreviewClip').btnBind().click(function(){
+               $j('#'+this.control_ct + ' .inOutPreviewClip').btnBind().click(function(){                      
                        $j('#embed_vid').get(0).stop();
                        $j('#embed_vid').get(0).play();
                });             
@@ -429,14 +461,14 @@ mvClipEdit.prototype = {
                return '<strong>' + gM('mwe-set_in_out_points') + '</strong>'+
                        '<table border="0" style="background: transparent; width:94%;height:50px;">'+
                                '<tr>' +
-                                       '<td style="width:55px">'+
+                                       '<td style="width:90px">'+
                                                gM('mwe-start_time') +
                                                '<input class="ui-widget-content ui-corner-all startInOut" size="9" value="' + setInt.start_ntp +'">'+
                                        '</td>' +
                                        '<td>' +
                                                '<div class="inOutSlider"></div>'+
                                        '</td>' +
-                                       '<td style="width:55px">'+
+                                       '<td style="width:90px;text-align:right;">'+
                                                gM('mwe-end_time') +
                                                '<input class="ui-widget-content ui-corner-all endInOut" size="9" value="'+ setInt.end_ntp +'">'+
                                        '</td>' +
@@ -599,14 +631,14 @@ mvClipEdit.prototype = {
        },
        applyVideoAdj:function(){
                js_log('applyVideoAdj::');
+               $tp = $j('#'+this.control_ct );
 
                //be sure to "stop the video (some plugins can't have DOM elements on top of them)
                $j('#embed_vid').get(0).stop();
 
-               //update video related keys:
-               ;
-               this.rObj['start_time'] = $j('#'+this.control_ct + ' .startInOut').val();
-               this.rObj['end_time']   = $j('#'+this.control_ct + ' .endInOut').val() ;
+               //update video related keys
+               this.rObj['start_time'] = $tp.find('.startInOut').val();
+               this.rObj['end_time']   = $tp.find('.endInOut').val() ;
 
                //do the local video adjust
                if(typeof this.rObj.pSobj['applyVideoAdj'] != 'undefined'){
@@ -621,7 +653,7 @@ mvClipEdit.prototype = {
                js_log( 'click:turn off' );
                var cat = _this.rObj;
                if(_this.rObj.crop){
-                       //empty out and display croped:
+                       //empty out and display cropped:
                        $j('#'+_this.clip_disp_ct ).empty().html(
                                '<div id="mv_cropcotainer" style="overflow:hidden;position:absolute;'+
                                        'width:' + _this.rObj.crop.w + 'px;'+
@@ -674,16 +706,6 @@ if(typeof mv_lock_vid_updates == 'undefined')
        mv_lock_vid_updates= false;
 
 function add_adjust_hooks(mvd_id, adj_callback){
-       /*myClipEdit = new mvClipEdit({
-               'control_ct': '#mvd_form_'+mvd_id
-       });
-       $j('#mvd_form_'+mvd_id).html(
-               mvClipEdit.getSetInOutHtml({
-                       'start_ntp'     :  $j('#mv_start_hr_' + mvd_id).val(),
-                       'end_ntp'       :  $j('#mv_end_hr_' + mvd_id).val()
-               })
-       );
-       mvClipEdit.setInOutBindings();*/
 
        var start_sec = npt2seconds($j('#mv_start_hr_' + mvd_id).val() );
        var end_sec   = npt2seconds($j('#mv_end_hr_' + mvd_id).val()  );
@@ -709,7 +731,7 @@ function add_adjust_hooks(mvd_id, adj_callback){
                change:function(event, ui){
                        do_video_time_update( seconds2npt( ui.values[0]), seconds2npt( ui.values[1] ) );
                }
-       });
+       });     
        $j('.mv_adj_hr').change(function(){
                //preserve track duration for nav and seq:
                //ie seems to crash so no interface updates for IE for the time being
@@ -727,8 +749,7 @@ function add_adjust_hooks(mvd_id, adj_callback){
 
 function do_video_time_update(start_time, end_time, mvd_id)    {
        js_log('do_video_time_update: ' +start_time +' '+ end_time);
-
-       if(mv_lock_vid_updates==false){
+       if( mv_lock_vid_updates == false ){
                //update the vid title:
                $j('#mv_videoPlayerTime').html( start_time + ' to ' + end_time );
                var ebvid = $j('#embed_vid').get(0);
@@ -740,4 +761,38 @@ function do_video_time_update(start_time, end_time, mvd_id)        {
                        ebvid.updateThumbTimeNTP( start_time );
                }
        }
-}
\ No newline at end of file
+}
+
+//some custom jquery bindings: 
+(function( $ ) {
+       $.fn.upDownTimeInputBind = function( inputCB ){                 
+               $( this.selector ).unbind('focus').focus(function(){                    
+                       var doDelayCall = true;
+                       $(this).addClass('ui-state-focus');     
+                       //bind up down keys
+                       $(this).unbind('keydown').keydown(function (e) {
+                               var sec = npt2seconds( $j(this).val() );
+                               var k = e.which;                                                                                                                                        
+                               if(k == 38 ){//up                                                                                               
+                                       $(this).val( seconds2npt( sec + 1 ) );
+                               }else if( k == 40 ){ //down                     
+                                       var sval = ( (sec - 1) < 0 ) ? 0 : (sec - 1)            
+                                       $(this).val(  seconds2npt( sval ) );                                            
+                               }                               
+                               //set the delay updates:
+                               if(k == 38 || k == 40){ 
+                                       var _inputElm = this;
+                                       if(doDelayCall){                                                                
+                                               setTimeout(function(){
+                                                       inputCB( _inputElm );
+                                                       doDelayCall = true;
+                                               },500);
+                                               doDelayCall = false;
+                                       }                                       
+                               }               
+                       });                                             
+               }).unbind('blur').blur(function(){
+                       $(this).removeClass('ui-state-focus');                                                                                  
+               });
+       }
+})(jQuery);
index 05478c6..c9316f6 100644 (file)
@@ -1416,7 +1416,7 @@ embedVideo.prototype = {
                this.paused = true;             
                this.thumbnail_disp = true;
                //make sure the ctrlBuilder remain active: 
-               this.ctrlBuilder.addControlHooks(this); 
+               this.ctrlBuilder.addControlHooks();     
        },
        refreshControlsHTML:function(){
                js_log('refreshControlsHTML::');
@@ -1426,7 +1426,7 @@ embedVideo.prototype = {
                        return ;
                }else{
                        $j('#' + this.id + ' .control-bar').html( this.getControlsHTML() );
-                       this.ctrlBuilder.addControlHooks(this);                                         
+                       this.ctrlBuilder.addControlHooks();                                             
                }               
        },   
        getControlsHTML:function()
@@ -1462,7 +1462,7 @@ embedVideo.prototype = {
                //js_log('should set: '+this.id);
                $j(this).html( html_code );                                     
                //add hooks once Controls are in DOM
-               this.ctrlBuilder.addControlHooks(this);         
+               this.ctrlBuilder.addControlHooks();             
                                                  
                //js_log('set this to: ' + $j(this).html() );   
                //alert('stop');
@@ -2334,12 +2334,9 @@ mediaPlayers.prototype =
        },
        addPlayer : function(player, mime_type)
        {               
-               //js_log('Adding ' + player.id + ' with mime_type ' + mime_type);
                for (var i =0; i < this.players.length; i++){
-                       if (this.players[i].id == player.id)
-                       {
-                               if(mime_type!=null)
-                               {
+                       if (this.players[i].id == player.id){
+                               if(mime_type!=null){
                                        //make sure the mime_type is not already there:
                                        var add_mime = true; 
                                        for(var j=0; j < this.players[i].supported_types.length; j++ ){
@@ -2347,15 +2344,16 @@ mediaPlayers.prototype =
                                                        add_mime=false;
                                        }                                       
                                        if(add_mime)
-                                               this.players[i].supported_types.push(mime_type);
+                                               this.players[i].supported_types.push( mime_type );
                                }
-                               return;
+                               return ;
                        }
                }
                //player not found: 
-               if(mime_type!=null)
-                       player.supported_types.push(mime_type);   
-                                
+               if( mime_type != null )
+                       player.supported_types.push(mime_type);
+                                 
+               js_log('Adding ' + player.id + ' with mime_type ' + mime_type);  
                this.players.push( player );
        },
        getMIMETypePlayers : function(mime_type)
@@ -2483,15 +2481,13 @@ var embedTypes = {
                this.players.addPlayer( htmlPlayer );                   
                 // In Mozilla, navigator.javaEnabled() only tells us about preferences, we need to
                 // search navigator.mimeTypes to see if it's installed
-                var javaEnabled = navigator.javaEnabled();
-                // In Opera, navigator.javaEnabled() is all there is
-                var invisibleJava = $j.browser.opera;
+                var javaEnabled = navigator.javaEnabled();                              
                 // Some browsers filter out duplicate mime types, hiding some plugins
-                var uniqueMimesOnly = $j.browser.opera || $j.browser.safari;
+                var uniqueMimesOnly = $j.browser.opera || $j.browser.safari;            
                 // Opera will switch off javaEnabled in preferences if java can't be found.
                 // And it doesn't register an application/x-java-applet mime type like Mozilla does.
-                if ( invisibleJava && javaEnabled )
-                        this.players.addPlayer( cortadoPlayer );
+                if ( javaEnabled )
+                        this.players.addPlayer( cortadoPlayer );                               
                
                 // ActiveX plugins
                 if($j.browser.msie){
@@ -2518,10 +2514,11 @@ var embedTypes = {
                         // VLC
                         if ( this.testActiveX( 'VideoLAN.VLCPlugin.2' ) )
                                 this.players.addPlayer(vlcActiveXPlayer);
-                        // Java
-                        if ( javaEnabled && this.testActiveX( 'JavaWebStart.isInstalled' ) )
-                                this.players.addPlayer(cortadoPlayer);
-                        // quicktime
+                                
+                        // Java ActiveX
+                        if ( this.testActiveX( 'JavaWebStart.isInstalled' ) )
+                                this.players.addPlayer( cortadoPlayer );
+                        // quicktime (currently off) 
                         //if ( this.testActiveX( 'QuickTimeCheckObject.QuickTimeCheck.1' ) )
                         //     this.players.addPlayer(quicktimeActiveXPlayer);                  
                 }                               
@@ -2551,7 +2548,7 @@ var embedTypes = {
                        }
                }                
                
-                // Mozilla plugins
+                // "navigator" plugins
                if( navigator.mimeTypes && navigator.mimeTypes.length > 0) {
                        for ( var i = 0; i < navigator.mimeTypes.length; i++ ) {
                                var type = navigator.mimeTypes[i].type;
@@ -2570,8 +2567,8 @@ var embedTypes = {
                                        continue;
                                }
                
-                               if ( javaEnabled || type == 'application/x-java-applet' ) {
-                                       this.players.addPlayer(cortadoPlayer);
+                               if ( type == 'application/x-java-applet' ) {
+                                       this.players.addPlayer( cortadoPlayer );
                                        continue;
                                }                               
                
index 164a275..c117c57 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * handles driving the firefogg render system 
 */
-
 var mvFirefoggRender = function( iObj ) {              
        return this.init( iObj );
 };
index 9f66ff7..d3b8c44 100644 (file)
@@ -154,7 +154,8 @@ mvPlayList.prototype = {
                 *      this_plObj_Clone.sequencer=true;
                 *      this_plObj_Clone.id= 'seq_plobj';
                 *      debugger;
-               */              
+                */             
+                
                //load sequencer: 
                $j("#sequencer_target").sequencer({                             
                        "mv_pl_src" : this.src                                          
@@ -412,36 +413,31 @@ mvPlayList.prototype = {
                }
        },
        renderDisplay:function(){               
-               js_log('mvPlaylist:renderDisplay:: track length: ' +this.default_track.getClipCount() );''
-               
-               var _this=this;                 
-               //setup layout for title and dc_ clip container  
-                                                                               
-               
-               //add the playlist controls:
+               js_log('mvPlaylist:renderDisplay:: track length: ' +this.default_track.getClipCount() );        
+               var _this=this;                                                                                 
                                                        
                //append container and videoPlayer; 
                $j(this).html('<div id="dc_'+this.id+'" style="width:'+this.width+'px;' +
-                               'height:'+(this.height+this.pl_layout.title_bar_height + this.pl_layout.control_height)+'px;position:relative;">' +                             
+                               'height:'+ ( this.height + this.pl_layout.title_bar_height +
+                               this.pl_layout.control_height ) + 'px;position:relative;">' +                           
                        '</div>');              
-               if(this.controls==true){        
+               if(this.controls == true){
+                       var cpos = _this.height + _this.pl_layout.title_bar_height;
+                       //give more space if not in sequence:
+                       cpos+= (this.sequencer)?2:5;                            
                        //append title:
                        $j('#dc_'+_this.id).append(
                                '<div style="font-size:13px;border:solid thin;width:'+this.width+'px;" id="ptitle_'+this.id+'"></div>' +
-                               '<div class="' + this.ctrlBuilder.pClass + '" style="position:absolute;top:'+(_this.height+_this.pl_layout.title_bar_height+4)+'px">' +
+                               '<div class="' + this.ctrlBuilder.pClass + '" style="position:absolute;top:'+cpos+'px">' +
                                '<div class="ui-widget-header ui-helper-clearfix control-bar" '+
                                        'style="width:' + _this.width + 'px" >' + 
                                                 _this.getControlsHTML() +
                                        '</div>'+
                                '</div>'
                        );                                                                                              
-                                       
-                       //add the play button:                                          
-                       $j('#dc_'+_this.id).append(
-                               this.cur_clip.embed.getPlayButton()
-               );
-               //once the controls are in the DOM add hooks: 
-                       this.ctrlBuilder.addControlHooks(this);
+                                                               
+               //once the controls are in the DOM add hooks:           
+                       this.ctrlBuilder.addControlHooks( );
                }else{
                        //just append the video: 
                        $j('#dc_'+_this.id).append(
@@ -467,9 +463,10 @@ mvPlayList.prototype = {
                        cout+='"></div>';
                        $j('#dc_'+_this.id).append( cout );     
                        //update the embed html:                                         
-                       clip.embed.height=_this.height;
-                       clip.embed.width=_this.width;                           
-                       clip.embed.play_button=false;
+                       clip.embed.height = _this.height;
+                       clip.embed.width = _this.width;                         
+                       clip.embed.play_button = false;
+                       clip.embed.controls = false;
                        
                        clip.embed.getHTML();//get the thubnails for everything                 
                        
@@ -524,15 +521,14 @@ mvPlayList.prototype = {
        updateBaseStatus:function(){
                var _this = this;
                js_log('Playlist:updateBaseStatus');
+               
                $j('#ptitle_'+this.id).html(''+
                        '<b>' + this.title + '</b> '+                           
                        this.getClipCount()+' clips, <i>'+
-                       seconds2npt( this.getDuration() ) + '</i>');
-                       
-               //only show the inline edit button if mediaWiki write API is enabled:
+                       seconds2npt( this.getDuration() ) + '</i>');                    
                
                //should probably be based on if we have a provider api url
-               if( typeof wgEnableWriteAPI != 'undefined'){
+               if( typeof wgEnableWriteAPI != 'undefined' && !this.sequencer ){
                        $j( $j.btnHtml('edit', 'editBtn_'+this.id, 'pencil', 
                                {'style':'position:absolute;right:0;;font-size:x-small;height:10px;margin-bottom:0;padding-bottom:7px;padding-top:0;'} )
                        ).click(function(){     
@@ -549,17 +545,18 @@ mvPlayList.prototype = {
        },      
        /*setStatus override (could call the jquery directly) */
        setStatus:function(value){
-               $j('#mv_time_'+this.id).html( value );
+               $j('#'+this.id + ' .time-disp' ).text( value );
        },
        setSliderValue:function(value){                         
                //slider is on 1000 scale: 
-               var val = parseInt( value *1000 );                      
+               var val = parseInt( value *1000 ); 
+               js_log('update slider: #' + this.id + ' .play_head to ' + val );        
                $j('#' + this.id + ' .play_head').slider('value', val);         
        },
        getPlayHeadPos: function(prec_done){
                var     _this = this;
                if($j('#mv_seeker_'+this.id).length==0){
-                       //js_log('no playhead so we can\'t get playhead pos' );
+                       js_log('no playhead so we can\'t get playhead pos' );
                        return 0;
                }
                var track_len = $j('#mv_seeker_'+this.id).css('width').replace(/px/, '');
@@ -714,7 +711,7 @@ mvPlayList.prototype = {
        //playlist play
        play: function(){
                var _this=this;
-               //js_log('pl play');
+               js_log('pl play');
                //hide the playlist play button: 
                $j(this.id + ' .play-btn-large').hide();                                
                
@@ -1125,10 +1122,11 @@ mvClip.prototype = {
                
                //if in sequence mode hide controls / embed links                
                //                      init_pl_embed.play_button=false;
-               init_pl_embed.controls=false;   
+               //init_pl_embed.controls=true;  
                //if(this.pp.sequencer=='true'){
                init_pl_embed.embed_link=null;  
-               init_pl_embed.linkback=null;    
+               init_pl_embed.linkback=null;
+                       
                
                if(this.poster)init_pl_embed['thumbnail']=this.poster;
                
index 2259af6..520e1d5 100644 (file)
@@ -114,8 +114,8 @@ var sequencerDefaultValues = {
        //trackObj used to payload playlist Track Object (when inline not present)
        tracks:{}
 }
-var mvSequencer = function(iObj) {
-       return this.init(iObj);
+var mvSequencer = function( iObj ) {
+       return this.init( iObj );
 };
 //set up the mvSequencer object
 mvSequencer.prototype = {
@@ -215,9 +215,9 @@ mvSequencer.prototype = {
                //add the container divs (with basic layout ~universal~
                $j(this.target_sequence_container).html(''+
                        '<div id="' + this.video_container_id + '" style="position:absolute;right:0px;top:0px;' +
-                               'width:' + this.video_width + 'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+
+                               'width:' + this.video_width + 'px;height:' + (this.video_height+54) + 'px;"/>'+
                        '<div id="' + this.timeline_id + '" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;' +
-                               'left:0px;right:0px;top:'+(this.video_height+34)+'px;bottom:35px;overflow:auto;">'+
+                               'left:0px;right:0px;top:'+(this.video_height+60)+'px;bottom:35px;overflow:auto;">'+
                                        gM('mwe-loading_timeline')+ '</div>'+
                        '<div class="seq_status" style="position:absolute;left:0px;width:300px;"></div>'+
                        '<div class="seq_save_cancel" style="position:absolute;'+
@@ -228,7 +228,7 @@ mvSequencer.prototype = {
                                gM('mwe-sequencer_credit_line') +
                        '</div>'+
                        '<div id="'+this.sequence_tools_id+'" style="position:absolute;' +
-                               'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>'
+                               'left:0px;right:'+(this.video_width+10)+'px;top:0px;height:'+(this.video_height+47)+'px;"/>'
                ).css({
                        'min-width':'850px'
                });
@@ -236,9 +236,9 @@ mvSequencer.prototype = {
                /*js_log('set: '+this.target_sequence_container + ' html to:'+ "\n"+
                        $j(this.target_sequence_container).html()
                );*/
+               
                //first check if we got a cloned PL object:
                //(when the editor is invoked with the plalylist already on the page)
-               //@@NOT WORKING... (need a better "clone" function)
                /*if( this.plObj != 'null' ){
                        js_log('found plObj clone');
                        //extend with mvSeqPlayList object:
@@ -260,7 +260,7 @@ mvSequencer.prototype = {
                }
                $j('#'+this.video_container_id).html('<playlist ' + src_attr +
                        ' style="width:' + this.video_width + 'px;height:' + this.video_height + 'px;" '+
-                       ' controls="false" id="' + this.plObj_id + '" />');
+                       ' sequencer="true" id="' + this.plObj_id + '" />');
                rewrite_by_id( this.plObj_id );
                setTimeout(this.instance_name +'.checkReadyPlObj()', 25);
        },
@@ -297,7 +297,7 @@ mvSequencer.prototype = {
                        bConf[ gM('mwe-cancel') ] = function(){
                                $j(this).dialog('close');
                        };
-                       bConf[ gm('mwe-edit_save') ] = function(){
+                       bConf[ gM('mwe-edit_save') ] = function(){
                                var saveReq = {
                                        'action'        : 'edit',
                                        'title'         : _this.plObj.mTitle,
@@ -1435,7 +1435,7 @@ mvSequencer.prototype = {
                $j(this.target_sequence_container).append('<div id="'+ this.timeline_id +'_pl_control"'+
                        ' style="position:absolute;top:' + (this.plObj.height) +'px;'+
                        'right:1px;width:'+this.plObj.width+'px;height:'+this.plObj.org_control_height+'" '+
-                       'class="' + this.plObj.ctrlBuilder.pClass + '"><div class="ui-widget ui-corner-bottom ui-state-default controls">'+
+                       'class="' + this.plObj.ctrlBuilder.pClass + '"><div class="ui-widget ui-corner-bottom ui-state-default control-bar">'+
                                         this.plObj.getControlsHTML() +
                                 '</div>'+
                        '</div>');
@@ -1443,7 +1443,7 @@ mvSequencer.prototype = {
                this.plObj.updateBaseStatus();
 
                //once the controls are in the DOM add hooks:
-               this.plObj.ctrlBuilder.addControlHooks(this.plObj);
+               this.plObj.ctrlBuilder.addControlHooks( $j('#' + this.timeline_id + '_pl_control' ) );
 
                //render out the "jump" div
                if(this.timeline_mode=='time'){
@@ -1499,7 +1499,7 @@ mvSequencer.prototype = {
                //refresh player:
                this.plObj.getHTML();
 
-               this.render_playheadhead_seeker();
+               //this.render_playheadhead_seeker();
                this.render_tracks();
                this.jt(this.playline_time);
 
index 0b830b5..16cb8f2 100644 (file)
@@ -1679,7 +1679,7 @@ function do_api_req( options, callback ) {
                return js_error( 'Error: request paramaters must be an object' );
        }
        // Generate the URL if it's missing
-       if( typeof options.url == 'undefined' || options.url === false ) {
+       if( typeof options.url == 'undefined' || !options.url ) {
                if( !wgServer || ! wgScriptPath ) {
                        return js_error('Error: no api url for api request');
                }
index 0e8c33c..e722417 100644 (file)
@@ -93,17 +93,15 @@ ctrlBuilder.prototype = {
         * addControlHooks
         * to be run once controls are attached to the dom
         */
-       addControlHooks:function(){
+       addControlHooks:function( $tp ){                
                //set up local pointer to the embedObj
                var embedObj = this.embedObj;
-               var _this = this;
-               //add in drag/seek hooks:
-               if(!embedObj.base_seeker_slider_offset &&  $j('#mv_seeker_slider_'+embedObj.id).get(0))
-                       embedObj.base_seeker_slider_offset = $j('#mv_seeker_slider_'+embedObj.id).get(0).offsetLeft;
-
-               //js_log('looking for: #mv_seeker_slider_'+embedObj.id + "\n " +
-               //              'start sec: '+embedObj.start_time_sec + ' base offset: '+embedObj.base_seeker_slider_offset);
-               var $tp=$j('#' + embedObj.id);
+               var _this = this;       
+               //var embed_id = (embedObj.pc!=null)?embedObj.pc.pp.id:embedObj.id;             
+                               
+               if( !$tp )
+                       $tp = $j( '#' + embedObj.id );
+               
                
                //add play hook:
                $tp.find('.play-btn').unbind().btnBind().click(function(){
@@ -171,7 +169,7 @@ ctrlBuilder.prototype = {
                        $j('#' +embedObj.id).get(0).fullscreen();
                });
 
-               js_log(" should add slider binding: " + $j('#'+embedObj.id + ' .play_head').length) ;
+               js_log(" should add slider binding: " + $tp.find('.play_head').length) ;
                $tp.find('.play_head').slider({
                        range: "min",
                        value: 0,
index bd8663b..970d868 100644 (file)
@@ -94,7 +94,7 @@
        font: 11px arial, sans-serif;
        line-height: 20px;
        overflow: hidden;
-       width: 36px;
+       width: 39px;
        float: right;
 }
 
index 36ca4bf..c600e92 100644 (file)
 .mv-player .vol_container_top{
        top:-77px;
 }
-.mv-player .vol_container .volume-slider{
+.      ayer .vol_container .volume-slider{
        margin-top:5px; 
        height:65px;
        width:10px;
        height: 29px;
        overflow: visible;
        font-size: 10.2px;
-       width: 80px;
+       width: 85px;
        float: right;
        display: inline;
        border:none;
        display: inline;        
        height: 10px;
        margin-left:10px;
-       margin-top:10px;        
+       margin-top:10px;
+       position:relative;      
 }
 
 .mv-player .play_head .ui-slider-handle{
index a3f80fc..f129ce9 100644 (file)
@@ -8,7 +8,7 @@ td{
 }
 </style>
 <script type="text/javascript" >
-var scriptLoaderURID = 't10';
+var scriptLoaderURID = 't11';
 //for just setting one or two to test at a time for debug
 var langKeyDebug = ['fr'];
 
@@ -25,7 +25,7 @@ var langKeyAll = [
                'zero'  => 0,
                'one'   => 1,
                'two'   => 2,
-               //n mod 100 in 3..10
+               //n mod 100 in 3..10    
                'few'   => array( 'mod' => 100, 'is'=>'3-10' ),
                //n mod 100 in 11..99
                'many'  => array( 'mod' => 100, 'is'=>'11-99')